<template>
  <div>
    <!-- -->
    <router-view />
  </div>
</template>

<script>
import localforage from 'localforage';
export default {
  name: 'Vue2App',

  data() {
    return {

    };
  },

  mounted() {
    localforage.getItem('loginTime').then((res) => {
      const gapTime = new Date().getTime() - res
      console.log(gapTime);
      if (gapTime > 20 * 24 * 60 * 30 * 1000) {
        console.log('登录过期');
        localforage.removeItem('loginStatus');
      }
    });
  },

  methods: {

  },
};
</script>